from django import forms
from ckeditor_uploader.widgets import CKEditorUploadingWidget
from learningPlanet.models import Blog


class BlogForm(forms.ModelForm):

    content=forms.CharField(widget=CKEditorUploadingWidget(
        attrs={'class': 'ckeditor', 'name': 'content'}
    ),label='',required=True,)

    class Meta:
        model=Blog
        fields=['content']
        # fields='__all__'